﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductDetails.aspx.cs" Inherits="FYPHP.ProductDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

        <asp:Label ID="lblUserName" runat="server" Visible="False"></asp:Label>
        <asp:Label ID="lblUserID" runat="server" Visible="False"></asp:Label>

<table cellpadding="10" cellspacing="5" width="722" border="1" bordercolor="#aaa" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
<h2>Product Details</h2>
 <tr style="background-color: #f2f2f2; font-weight: bold;"><td colspan="2">
     <asp:Label ID="lblPname" runat="server"></asp:Label></td></tr>
 <tr><td width="310px">
 <a href="/uploads/products/<% Response.Write(getPic()); %>" title="" class="thickbox">
<img src="/uploads/products/<% Response.Write(getPic()); %>" alt="" height="300px" width="300px" />
</a><i style="font-size: 11px">Click to view larger size.</i>
</td>

<td style="text-align: left; margin-left: 40px;" valign="top">
Product ID : <asp:Label ID="lblID" runat="server" Text=""></asp:Label>
<br /><br />
Seller : <asp:Label ID="lblSeller" runat="server" Text=""></asp:Label>
<br /><br />
Description : <asp:Label ID="lblDesc" runat="server" Text=""></asp:Label>
<br /><br />
Category : <asp:Label ID="lblCat" runat="server" Text=""></asp:Label>
<br /><br />
Views : <asp:Label ID="lblView" runat="server" Text=""></asp:Label>

    <br />
    <br />
    Quantity Available :
    <asp:Label ID="lblQuantity" runat="server"></asp:Label>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price/unit:
    <asp:Label ID="lblPrice" runat="server"></asp:Label>
    <br />
    <br />
    Quantity to purchase :
    <asp:DropDownList ID="ddlQuantity" runat="server">
    </asp:DropDownList>
    <br />
    <table align="left" cellspacing="3" cellpadding="3" border="0" style="margin-top: 5px;">
    <tr><td><asp:Button ID="btnAddShoppingCart" runat="server" 
        onclick="AddShoppingCart_Click" Text="Add to Shopping Cart" Width="160px" Height="30px" /></td>
        
        <td> <asp:Button ID="btnReserveProduct" runat="server" 
        onclick="ReserveProduct_Click" Text="Reserve Product" Width="160px" Height="30px" /></td></tr>
       <tr><td><asp:Button ID="btnRemoveProduct" runat="server" 
        onclick="btnRemoveProduct_Click" Text="Remove Product" Visible="False" 
               OnClientClick="return confirm('Are you sure you want to delete this product?');" 
               Width="160px" Height="30px"  />
         </td>
         <td> 
             <asp:Button ID="btnEditProducts" runat="server" onclick="btnEditProducts_Click" 
        Text="Edit Product" Visible="False" Width="160px" Height="30px" /></td></tr>
        <tr><td colspan="2"><iframe src="//www.facebook.com/plugins/like.php?href&amp;send=false&amp;layout=standard&amp;width=365&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35&amp;appId=203187513030864" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:365px; height:35px;" allowTransparency="true"></iframe></td></tr>
       </table>
    

</td>
</tr>
</table>
<br />
<table width="722" cellpadding="5" cellspacing="0"  style="margin: 0 auto; border: 1px solid #aaa; line-height: 18px;">
<tr><td style="background-color: #dddddd; font-weight: bold; text-align: center; border-bottom: 1px solid #aaa">Comments</td></tr>

    <asp:Repeater ID="Repeater1" runat="server" onitemcommand="Repeater1_ItemCommand" OnItemDataBound="Repeater1_ItemDataBound">
       
       <ItemTemplate>
        <tr style="background-color: #f3f3f3"><td colspan="2"><b><span style="float: left">
            <%#DataBinder.Eval(Container.DataItem, "username" ) %> </b>&nbsp;said : </span>

            <asp:Button ID="btnDeleteComment" runat="server" Text="X" CommandName="DeleteComment" 
        CommandArgument='<%# Eval("c_id").ToString() %>' style="float: right; font-size: 11px;" /> </td></tr>

        <tr><td>&nbsp;<%#DataBinder.Eval(Container.DataItem, "c_desc" ) %></td></tr>
        <tr>
            <td valign="bottom" style="text-align: right; font-size: 11px;">
            <i><%#DataBinder.Eval(Container.DataItem, "c_date" ) %></i>
                </td>
        </tr>

    </ItemTemplate>
    </asp:Repeater>
</table>
    <asp:Panel ID="Panel1" runat="server">
<table width="722" cellpadding="0" cellspacing="0"  style="margin: 0 auto;">
    <tr><td width="100%" valign="top" style="text-align: center;">
    <br />
<asp:TextBox ID="txtComment" runat="server" Height="100px" Width="600px" 
            TextMode="MultiLine" MaxLength="100"></asp:TextBox> <br />
                <asp:Button ID="btnAddComment" runat="server" Text="Add" 
            onclick="btnAddComment_Click" />&nbsp;
                <asp:Button ID="btnClear" runat="server" Text="Clear" 
            onclick="btnClear_Click" />
    </td>
</tr>
</table>
    </asp:Panel>
</asp:Content>
